
#ifndef EXCEPTION_H
#define EXCEPTION_H

#include <Defines.h>
#include <CSharpPropertyMethods.h>
#include <CSharpGarbagePointer.h>

namespace Riccsson
{
	namespace System
	{
		// Forward declerations.
		class String;
		class SerializationInfo;
		
		// Not implemented.
		class StreamingContext;

		class Exception
		{
			PROP3(Exception, int, HResult)

		private:
			int hresult;
			GC_PTR<String> m_what;

			COPY_CONSTRUCTOR(Exception)
			{
				PROP3_INIT_COPY(Exception, int, HResult);
			}

			public: Exception();
			public: Exception(const char* message);
			public: Exception(const String* message);
			public: Exception(const String& message);

			public: Exception (String* message, Exception* innerException)
				: PROP3_INIT(Exception, HResult)
            {

            }

			protected: Exception(SerializationInfo* info, StreamingContext* context)
				: PROP3_INIT(Exception, HResult)
            {

            }
			public: ~Exception(void);


			public: PROP3_GET(int, HResult)
			{
				return hresult;
			}
			protected: PROP3_SET(int, HResult)
			{
				hresult = value;
			}

		};
	}
}

#endif

